home *** CD-ROM | disk | FTP | other *** search
/ Gigarom 1 / Gigarom Macintosh Archives (Quantum Leap)(CDRM1080320)(1993).iso / FILES / HYP / C-D / DeveloperStax.cpt / Developer Stack 1.2r / card_37655.txt < prev    next >
Text File  |  1989-02-26  |  2KB  |  72 lines

  1. -- card: 37655 from stack: in.2r
  2. -- bmap block id: 0
  3. -- flags: 0000
  4. -- background id: 3837
  5. -- name: HPopUpMenu
  6.  
  7.  
  8. -- part 2 (button)
  9. -- low flags: 00
  10. -- high flags: A004
  11. -- rect: left=254 top=30 right=53 bottom=351
  12. -- title width / last selected line: 0
  13. -- icon id / first selected line: 0 / 0
  14. -- text alignment: 1
  15. -- font id: 0
  16. -- text size: 12
  17. -- style flags: 0
  18. -- line height: 16
  19. -- part name: try it
  20. ----- HyperTalk script -----
  21. on mousedown
  22.   if the optionkey is down then edit script of me
  23.  
  24.   put "Select,an,item,from,this,menu"&return&"hello,how,are,you" into items
  25.   put rect of me into temp
  26.  
  27.   put HPopupMenu(items,0,item 4 of temp,(item 1 of temp)+1)
  28.  
  29. end mousedown
  30.  
  31.  
  32.  
  33. -- part contents for background part 5
  34. ----- text -----
  35. HPopUpMenu
  36.  
  37. -- part contents for background part 6
  38. ----- text -----
  39. The HPopupMenu XFCN allows you to create hierarchical popup menus.
  40.  
  41.  
  42.  
  43.  
  44. This is freeware!
  45.  
  46.  Guy de Picciotto.
  47.  
  48. CIS: 73300,3637
  49. GENIE: G.PICCIOTTO
  50.  
  51.  
  52.  
  53. -- part contents for background part 7
  54. ----- text -----
  55. Syntax:
  56.  
  57. IMPORTANT: this must be called from within a MOUSEDOWN handler!
  58.  
  59. HPopupMenu (<items>,<checkedItem>,<Top>,<Left>)
  60.  
  61. 'items' contains the menu items. Menu items in the main menu are separated by a Return and items in a submenu are separated by a ','  . Only 2 levels of menus are allowed, this should be enough in most cases.
  62.  
  63. 'CheckedItem' is the item in the main menu you want to be checked.
  64.  
  65. 'Top' and 'left' are the coordinate where you want the menu to appear.
  66.  
  67. The function returns the menu line as the first item and the submenu line as the second item of the result.  If the mouse is released outside of a menu, the function returns 0 (zero).
  68.  
  69.  
  70. -- part contents for background part 10
  71. ----- text -----
  72. 43